/*
 * Copyright (C) 2009 M. Hautle.
 * 
 * This file is part of TrackedBean.
 * 
 * TrackedBean is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * TrackedBean is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along with TrackedBean. If not, see <http://www.gnu.org/licenses/>.
 */
package ch.trackedbean.data;

import java.util.*;
import ch.trackedbean.business.*;
import ch.trackedbean.copier.annotations.*;
import ch.trackedbean.data.evaluator.*;
import ch.trackedbean.data.validator.*;
import ch.trackedbean.validator.annotations.*;

/**
 * TO for {@link DomB} and {@link DomC}.
 * 
 * @author M. Hautle
 */
@SourceClass(DomC.class)
@ValidateBusinessContent(value = DomCValidator.class, resolver = MappingResolver.class)
public class TOBC extends TOA {
	public static final String ATTR_IGNORE = "ignore";

	public static final String ATTR_EXTERNAL_B = "externalB";

	public static final String ATTR_EXT_LIST = "extList";

	public static final String ATTR_SIMPLE_C = "simpleC";

	public static final String ATTR_SIMPLE_B = "simpleB";

	public static final String ATTR_LIST = "list";

	/** Property mapped on {@link DomB#ATTR_EXTERNAL_B}. */
	@ExternalMapping(DomB.class)
	private int externalB;

	/** Property to ignore ({@link DomC#ATTR_IGNORE}). */
	@IgnoreMapping
	private String ignore;

	/** Property via simple mapping on source class. */
	@SimpleMapping(DomC.ATTR_SIMPLE)
	private String simpleC;

	/** Property via simple mapping on {@link DomB#ATTR_SIMPLE}. */
	@SimpleMapping(value = DomB.ATTR_SIMPLE, srcClass = DomB.class)
	private String simpleB;

	/** Simple list mapping from {@link DomC#ATTR_LIST}. */
	@DeepValidation
	@ListMapping(srcEvaluator = DomEvaluator.class)
	private List<TOA> list;

	/** Full list mapping from {@link DomB#ATTR_LIST_B}. */
	@DeepValidation
	@ListMapping(dstType = TOA.class, srcClass = DomB.class, srcProperty = DomB.ATTR_LIST_B)
	private Set<TOA> extList;

	/**
	 * @return Returns the externalB.
	 */
	public int getExternalB() {
		return externalB;
	}

	/**
	 * @param externalB The externalB to set.
	 */
	public void setExternalB(int externalB) {
		this.externalB = externalB;
	}

	/**
	 * @return Returns the ignore.
	 */
	public String getIgnore() {
		return ignore;
	}

	/**
	 * @param ignore The ignore to set.
	 */
	public void setIgnore(String ignore) {
		this.ignore = ignore;
	}

	/**
	 * @return Returns the simpleC.
	 */
	public String getSimpleC() {
		return simpleC;
	}

	/**
	 * @param simpleC The simpleC to set.
	 */
	public void setSimpleC(String simpleC) {
		this.simpleC = simpleC;
	}

	/**
	 * @return Returns the simpleB.
	 */
	public String getSimpleB() {
		return simpleB;
	}

	/**
	 * @param simpleB The simpleB to set.
	 */
	public void setSimpleB(String simpleB) {
		this.simpleB = simpleB;
	}

	/**
	 * @return Returns the list.
	 */
	public List<TOA> getList() {
		return list;
	}

	/**
	 * @param list The list to set.
	 */
	public void setList(List<TOA> list) {
		this.list = list;
	}

	/**
	 * @return Returns the extList.
	 */
	public Set<TOA> getExtList() {
		return extList;
	}

	/**
	 * @param extList The extList to set.
	 */
	public void setExtList(Set<TOA> extList) {
		this.extList = extList;
	}
}
